home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MWDcmdShell.c
-
- Contains: Dispatch code of a Metrowerks CodeWarrior-built dcmd. Developed with CW Pro 3.
-
- Version: 1.1
-
- Written by: Greg Robbins and Jim Murphy
-
- Copyright: ⌐ 1995, 1998 by Apple Computer, Inc., All Rights Reserved.
-
- File Ownership:
-
- DRI: Jim Murphy
-
- Other Contact: Dave Lyons
-
- Technology: MacsBug
-
- Writers:
-
- (JM3) Jim Murphy
-
- Change History (most recent first):
-
- <2> 7/13/98 JM3 No need to call Enter/ExitCodeResource, the glue now handles A4
- transparently. Spell CodeWarrior correctly, duh. Version 1.1.
- <1> 6/29/98 JM3 first checked in
-
-
-
- */
-
-
- #include <MacMemory.h>
- #include <MacTypes.h>
-
- #include "dcmd.h"
-
- pascal void CommandEntry (dcmdBlock* paramPtr);
-
- //**********************************************************************************************************************
- //
- // CommandEntry -
- //
-
- pascal void CommandEntry (dcmdBlock* paramPtr)
- {
-
- static const char usageStr[] = "\p[usage options here] (Metrowerks CodeWarrior sample dcmd)";
-
- switch (paramPtr->request)
- {
- case dcmdInit:
- break;
-
- case dcmdHelp:
- dcmdDrawLine("\pThis is a sample dcmd written with Metrowerks CodeWarrior Pro 3");
- dcmdDrawLine("\pby Jim Murphy and Greg Robbins");
- break;
-
- case dcmdGetInfo:
- * (long *) &((GetInfoRequestBlockPtr) paramPtr->requestIOBlock)->dcmdVersion = 0x01108000; // version 1.1 final
- BlockMoveData(&usageStr, &((GetInfoRequestBlockPtr) paramPtr->requestIOBlock)->usageStr, usageStr[0]+1);
- break;
-
- case dcmdDoIt:
- dcmdDrawLine("\pMWDcmd says hello.");
- break;
- }
-
- } // CommandEntry
-